<?php

class GoodsController extends Controller {
    public function indexAction () {
        return $this->listGoodsAction();
    
    }
    
    //显示商品
    public function viewAction () {
       
        $id = intval(Context::getParam('id'));
        $model_goods = new GoodsModel();
        $this->one = $model_goods->getGoods($id);
        return 'goods/view';
    }
    
    public function addAction () {
        $this->title = '添加商品';
        
        $model_class = new GoodsclassModel();
        $this->classes = $model_class->retriveAll();
        
        return 'goods/add';
    }
}
?>
